﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication01._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <style>
        th{
            text-align:center;
        }
        td{
            text-align:center;
            width:200px;
        }
    </style>

    <asp:Button runat="server" Text="新增" OnClick="Unnamed_Click" style="margin-top:15px;"  />

    <asp:GridView runat="server" ID="gv1" AutoGenerateColumns="false" style="margin-top:10px"  OnRowCancelingEdit="gv1_RowCancelingEdit" OnRowEditing="gv1_RowEditing" OnRowDeleting="gv1_RowDeleting" OnRowUpdating="gv1_RowUpdating">

        <Columns>
            <asp:BoundField DataField="id" HeaderText="Id" />
            <asp:BoundField DataField="title" HeaderText="标题" />
            <asp:BoundField DataField="Content" HeaderText="内容" />
            <asp:BoundField DataField="Author" HeaderText="作者" />
            <asp:BoundField DataField="Remarks" HeaderText="备注" />
            <asp:CommandField ShowCancelButton="true" ShowDeleteButton="true" ShowEditButton="true" HeaderText="操作" />

        </Columns>

    </asp:GridView>

</asp:Content>
